package com.company.project.controller;

import com.company.project.common.aop.annotation.LogAnnotation;
import com.company.project.common.utils.DataResult;
import com.company.project.service.BigScreenService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/bigscreen")
@Api(tags = "投屏")
public class BigScreenController {
    @Resource
    private BigScreenService bigScreenService;
    /**
     * 护林员履职
     * @return
     */
    @PostMapping("performance")
    @LogAnnotation(title = "投屏", action = "护林员履职")
    public DataResult performance() {
        return DataResult.success(bigScreenService.performance());
    }

    /**
     * 工资情况
     * @return
     */
    @PostMapping("salary")
    @LogAnnotation(title = "投屏", action = "工资情况统计")
    public DataResult salary() {
        return DataResult.success(bigScreenService.salary());
    }

    /**
     * 人员分布
     * @return
     */
    @LogAnnotation(title = "投屏", action = "人员分布")
    @PostMapping("personDistrib")
    public DataResult personDistr() {
        return DataResult.success(bigScreenService.personDistr());
    }

    /**
     * 年龄分布
     *
     * @return
     */
    @LogAnnotation(title = "投屏", action = "年龄分布")
    @PostMapping("personAges")
    public DataResult ageGroup() {
        return DataResult.success(bigScreenService.ageGroup());
    }

    /**
     * 性别分布
     *
     * @return
     */
    @LogAnnotation(title = "投屏", action = "性别分布")
    @PostMapping("personSexs")
    public DataResult sex() {
        return DataResult.success(bigScreenService.sex());
    }
}
